﻿/* Write a program that reads a string, reverses it and prints the result at the console.
Example: "sample"  "elpmas".
*/

using System;
using System.Text;

namespace _2.ReverseString
{
    class ReverseString
    {
        static void Main()
        {
            Console.Write("Enter something: ");
            string str = Console.ReadLine();
            StringBuilder sb = new StringBuilder();
            for (int i = str.Length - 1; i >= 0; i--) sb.Append(str[i]);
            Console.WriteLine("Reversed string: {0}", sb.ToString());
        }
    }
}
